﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Developer.Core.FrameWork.DynamicMiddlePlatformService.Service
{
    /// <summary>
    /// 动态中台服务
    /// </summary>
    public interface IDynamicMiddlePlatformService
    {
        IList<IDictionary<string, object>> GetList(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        IDictionary<string, object> Get(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        dynamic GetDynamic(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        IList<T> GetList<T>(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam) where T : new();


        /// <summary>
        /// Get请求
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        T Get<T>(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam) where T : new();

        /// <summary>
        /// Post请求
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        void Post(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        /// <summary>
        /// Post请求
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        void Post(string urlScheme, string serviceName, string serviceLink, IList<IDictionary<string, object>> middleParam);

        /// <summary>
        /// Post请求，动态参数
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        dynamic PostDynamic(string urlScheme, string serviceName, string serviceLink, dynamic middleParam);

        /// <summary>
        /// Delete请求
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        void Delete(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        /// <summary>
        /// Delete请求
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        dynamic DeleteDynamic(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        /// <summary>
        /// Put请求
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        void Put(string urlScheme, string serviceName, string serviceLink, IDictionary<string, object> middleParam);

        /// <summary>
        /// Put请求，动态参数
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        dynamic PutDynamic(string urlScheme, string serviceName, string serviceLink, dynamic middleParam);

        /// <summary>
        /// Put请求
        /// </summary>
        /// <param name="urlScheme"></param>
        /// <param name="serviceName"></param>
        /// <param name="serviceLink"></param>
        /// <param name="middleParam"></param>
        void Put(string urlScheme, string serviceName, string serviceLink, IList<IDictionary<string, object>> middleParam);
    }
}
